package com.yuchen.ishop.web.admin;

import com.yuchen.ishop.service.admin.sys.RoleService;
import com.yuchen.ishop.web.BaseAction;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 权限
 */
@Controller
@RequestMapping(value = "/admin/role")
public class RoleAction extends BaseAction {

    private final static Logger LOG = Logger.getLogger(RoleAction.class);

    @Autowired
    private RoleService roleService;

    @RequestMapping(value = "/index")
    public String index(ModelMap modelMap)throws Exception {
        modelMap.addAttribute("roles",roleService.find());
        return "admin/role/index";
    }
}
